package xyz.bali16.module.notification.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gitee.starblues.annotation.Supplier;
import xyz.bali16.application.entity.User;
import xyz.bali16.module.notification.entity.Notification;
import xyz.bali16.module.notification.entity.NotificationDTO;
import xyz.bali16.module.notification.enums.NotificationTypeEnum;
import xyz.bali16.module.notification.model.NotificationAddParam;
import xyz.bali16.module.notification.model.NotificationPageParam;
import xyz.bali16.module.notification.model.NotificationUpdateParam;

/**
 * @author bali2 on 9/3/2023.
 * @version 1.0
 */

public interface NotificationService extends IService<Notification> {

    IPage<Notification> getPage(NotificationPageParam param);
    void add(NotificationAddParam param) throws Exception;

    void update(NotificationUpdateParam param) throws Exception;

    void updateStatus(String id, Integer status) throws Exception;

    void delete(String id) throws Exception;

    Integer unreadCount(String userId);

    NotificationDTO read(String id, User user) throws Exception;

    void removeAllByUserId(String userId);
    
    void readAllByUserId(String userId);


    void createNotify(String notifierId, String receiverId, String notifierName, String outerTitle, NotificationTypeEnum notificationType, String outerId);
}
